<?php
namespace Home\Controller;
use Common\Controller\CommonController;
use Common\Model\UserModel;
use Common\Model\ConfigModel;
class HomeController extends CommonController {
    protected $home_user_info;
    protected $config;
    public function __construct()
    {
        parent::__construct();
        $user_id=$_SESSION['USER_KEY_ID'];
        $this->home_user_info=UserModel::newSelf()->findUserByUserId($user_id);
        
        if (!$this->home_user_info) {
            $this->redirect('Login/index');
        }
        $this->assign('home_user_info',$this->home_user_info);
        $this->config=ConfigModel::newSelf()->getInfo();
        $this->assign('home_config',$this->config);
    }
    
}